package com.ahearttogo.rpc.server;

import com.ahearttogo.rpc.common.utils.ReflectionUtil;
import com.ahearttogo.rpc.proto.Request;

/**
 * 调用具体服务
 * @author xiejialin
 * @date 2020/2/17 4:22 PM
 */
public class ServiceInvoker {

    public Object invoke (ServiceInstance service, Request request){
        return ReflectionUtil.invoke(service.getTarget(),service.getMethod(),request.getParameters());
    }
}
